//
//  MHCustomTip.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/9/22.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHCustomTip.h"

@implementation MHCustomTip

-(MHCircleLocationModel *)circleLocation
{
    NSDictionary *dic =   @{
                            @"lon":@(self.location.longitude),
                            @"lat":@(self.location.latitude),
                            @"address":self.address,
                            @"adcode":self.adcode,
                            @"citycode":self.cityCode,
                            @"areaName":self.name,
                            @"district":self.district,
                            @"isShowLocation":@(self.isShowLocation),
                            };
    return [MHCircleLocationModel yy_modelWithDictionary:dic];
}
+(MHCustomTip *) createWithAMapPOI:(AMapPOI *)POI
{
    MHCustomTip *tip =  [[MHCustomTip alloc] init];
    tip.uid = POI.uid;
    tip.name = POI.name;
    tip.adcode = POI.adcode;
    tip.district = POI.district;
    tip.address = POI.address;
    tip.location = POI.location;
    tip.typecode = POI.typecode;
    tip.cityCode = POI.citycode;
    tip.isShowLocation = YES;
    return tip;
}

@end
